package com.shipment.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

/**
 * 发货订单实体类
 */
@Data
@TableName("t_delivery_orders")
@Schema(description = "发货订单信息")
public class DeliveryOrder {

    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "发货项目名称（包含类型）")
    private String projectName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "发货时间")
    private Date deliveryDate;

    @Schema(description = "是否支持中英文（0=否，1=是）")
    private Boolean supportMultilang;

    @Schema(description = "甲方地址")
    private String clientAddress;

    @Schema(description = "甲方联系人")
    private String clientContact;

    @Schema(description = "甲方电话")
    private String clientPhone;

    @Schema(description = "发货公司名称")
    private String companyName;

    @Schema(description = "加密狗序列号（如适用）")
    private String usbKeySerial;

    @Schema(description = "是否为正版软件（0=否，1=是）")
    private Boolean isGenuine;

    @Schema(description = "正版系统激活码（如是正版）")
    private String genuineActivationCode;

    @Schema(description = "软件名称备注（如非正版）")
    private String softwareNote;

    @Schema(description = "项目负责人姓名")
    private String leaderName;

    @Schema(description = "负责人所在部门")
    private String leaderDepartment;

    @Schema(description = "发货用途（如：合同履行、参展、借用等）")
    private String deliveryPurpose;

    @Schema(description = "是否异常发货（0=否，1=是）")
    private Boolean isAbnormalDelivery;

    @Schema(description = "异常原因说明（如异常发货为是）")
    private String abnormalReason;

    @Schema(description = "上传附件路径（多个用逗号分隔）")
    private String attachmentPaths;

    @Schema(description = "原始发货订单ID（如为补充发货）")
    private Long originalOrderId;

    @Schema(description = "订单状态（0=待审核，1=已审核，2=已修改待审核）")
    private Integer orderStatus;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private Date updateTime;
}
